const num1: number = 1;

interface Demo1 {
  name: string;
  age: number;
}

const demo1: Demo1 = {
  name: "Lee",
  age: 20,
};

console.log(demo1);

const demo2: {
  name: string;
  age: number;
} = {
  name: "Mike",
  age: 30,
};

console.log(demo2);

const demo3: string[] = ["aa", "bb"];
console.log(demo3);

class Demo4 {}
const demo4: Demo4 = new Demo4();
console.log(demo4);

const demo5: () => string = () => {
  return "abc";
};
console.log(demo5);
console.log(demo5());

let list: number[] = [1, 2, 3];
let list2: Array<number> = [1, 2, 3];

let x: [string, number] = ["a", 1];

let cc: any = "abc";
const ll = (cc as string).length;

console.log(ll);

export type Person<T> = {
  name: string;
  age: number;
  info: T;
};

const p1: Person<{ skill: string[] }> = {
  name: "Tom",
  age: 20,
  info: {
    skill: ["ride", "run"],
  },
};

console.log(p1);

class Person2 {}

class Student2 extends Person2 {}

function say<T extends { id: string }>(a: T): T {
  return a;
}

say({ id: "123" });
